﻿<%@ Page EnableEventValidation="false" MasterPageFile="~/MasterPage.master" Title="" Language="C#" AutoEventWireup="true" CodeBehind="SaleOff.aspx.cs" Inherits="E2_WEBSITE.SaleOff" %>
<%@ Register TagPrefix="obout" Namespace="Obout.Grid" Assembly="obout_Grid_NET" %>
<%@ Register TagPrefix="owd" Namespace="OboutInc.Window" Assembly="obout_Window_NET"%>
<%@ Register TagPrefix="osb" Namespace="OboutInc.OboutSuperButton" Assembly="obout_SuperButton" %>
<%@ Import Namespace="E2_WEBSITE.Code" %>
<%-- Add content controls here --%>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
          
    
    <obout:Grid runat="server" ID="grid1" AutoGenerateColumns="False"
		    FolderStyle="/App_Themes/E2GroupTheme/obout/styles/style_4" 
		    AllowAddingRecords="false" 
		    AllowColumnResizing = "true"
		    AllowRecordSelection = "false"
		    AllowSorting = "true" PageSize="5" AllowPaging="true" 
		    Serialize="true">
		    
            <Columns>          
                   
                <obout:Column DataField="Url" HeaderText="Hình &#7843;nh" Wrap = "true" Align="center" Width="100">
                    <TemplateSettings TemplateId="ImageBtnTemplate" />
                </obout:Column>  
                                  
                <obout:Column DataField="TenSanPham" HeaderText="Tên s&#7843;n ph&#7849;m" Wrap = "true" Align="center" Width="150"></obout:Column>                
            
                <obout:Column DataField="KhuyenMai.HinhThuc" HeaderText="Khuyến mãi" Wrap = "true" Width="200">
                    <TemplateSettings TemplateId="tmpKhuyenMai" />
                </obout:Column>
                       
                <obout:Column DataField="id" HeaderText="Thêm vào gi&#7887;" Wrap="true" Align="center" Width="120">
                    <TemplateSettings TemplateId="BtnThemVaoGioTemplate" />
                </obout:Column>
                
            </Columns>
            <ScrollingSettings ScrollHeight="520" ScrollWidth = "100%"/>
                        
            <Templates>                                
                <obout:GridTemplate runat="server" ID="BtnThemVaoGioTemplate">                                                     
                    <Template>      
                        <a style="outline:none" href="/cp/member/addtocart.aspx?pID=<%# Container.DataItem["id"] %>&cID=<%# Container.DataItem["idHinhAnh"]%>&quan=1">
                            <img alt="Thêm vào giỏ" src="/images/add_cart.gif" />
                        </a>                                      
                    </Template>
                </obout:GridTemplate>
                                                
                <obout:GridTemplate runat="server" ID="tmpKhuyenMai">
                    <Template>
                    <div> 
                        <ul>
                            <li>Hình thức khuyến mãi: <%# Container.DataItem["HinhThuc"]%></li>
                            <li>Phần trăm giảm: <%# Container.DataItem["PhanTramGiam"]%></li>
                        </ul>
                    </div>
                    
                    </Template>
                </obout:GridTemplate>
		        
		        <obout:GridTemplate runat="server" ID="ImageBtnTemplate">
			        
			        <Template>
			            <a href = "/Products/detail.aspx?ProductId=<%# Container.DataItem["id"]%>" style="outline:none">
			                <img src="/images/HinhAnhSanPham/<%# Container.DataItem["Url"] %>" alt="<%# Container.DataItem["TenSanPham"] %>" width="50" height="50" border="0" />
			            </a>
			        </Template>
			        
			            
		        </obout:GridTemplate>		        
	        </Templates>
                                    
            <MasterDetailSettings LoadingMode="OnCallback" />
            
     </obout:Grid>
    
    <div id="div1" align = "center">
        <owd:Window ID="myWindow" runat="server" IsModal="true" 
            ShowCloseButton="true" Status="" Left="25" Top="30" 
            Height="500"  Width="480" VisibleOnLoad="false"
            StyleFolder="/App_Themes/E2GroupTheme/obout/wdstyles/aura" 
            Title="Thông tin s&#7843;n ph&#7849;m">
        </owd:Window>
    </div>
    
    <script type="text/javascript" src="/JavaScripts/jquery-1.3.2.js">
    </script>
    <script type="text/javascript">
        $("document").ready(function() {
            $("#btnOpenEditField").bind("click", function() {
                $("#div1").toggle("fast");
                });
        });
    </script>
    
    
</asp:Content>